package entity;

import org.hibernate.annotations.*;
import org.hibernate.annotations.Cache;

import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/**
 * Created by xuweijie on 2017/4/20.
 * 商品实体
 */
@Entity
@Table(name = "cro_purgoods")
@DynamicInsert(true)
//@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class CroPurgoods implements Serializable {
    private String id;
    private String type;
    private String goodname;
    private String description;
    private double uniprice;
    private Date createtime;
    private Date overdate;
    private String hasgoods;
    private String del_flag;
    private String goodsnumber;



    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getGoodname() {
        return goodname;
    }

    public void setGoodname(String goodname) {
        this.goodname = goodname;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public double getUniprice() {
        return uniprice;
    }

    public void setUniprice(double uniprice) {
        this.uniprice = uniprice;
    }

    @CreationTimestamp
    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getOverdate() {
        return overdate;
    }

    public void setOverdate(Date overdate) {
        this.overdate = overdate;
    }

    @Column(columnDefinition ="varchar(1) default '0'")
    public String getHasgoods() {
        return hasgoods;
    }

    public void setHasgoods(String hasgoods) {
        this.hasgoods = hasgoods;
    }

    @Column(columnDefinition ="varchar(1) default '0'")
    public String getDel_flag() {
        return del_flag;
    }

    public void setDel_flag(String del_flag) {
        this.del_flag = del_flag;
    }

    public String getGoodsnumber() {
        return goodsnumber;
    }

    public void setGoodsnumber(String goodsnumber) {
        this.goodsnumber = goodsnumber;
    }
}
